* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", 微软雅黑, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to right, #1a5a94, #2a7bc4);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 10px;
    font-size: 24px;
}

.system-title {
    font-size: 20px;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-size: 14px;
}

.change-password-link {
    background-color: #007bff;
    color: white;
    padding: 6px 15px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s;
}

.change-password-link:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.logout-form {
    display: inline;
}

.logout-btn {
    background-color: #c8161d;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #a70f16;
}


/* 修改密码表单样式 */
.change-password-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.change-password-form .form-group {
    margin-bottom: 20px;
}

.change-password-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.change-password-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.change-password-form input[type="password"]:focus {
    border-color: #1a5a94;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 90, 148, 0.2);
}

.change-password-form .password-hint {
    font-size: 12px;
    color: #dc3545;
    margin-top: 5px;
    padding: 5px;
    background-color: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.change-password-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1a5a94;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success-message {
    color: #28a745;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 页面主体布局 */
.main-container {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* 左侧导航栏样式 - 政务风格 */
.sidebar {
    width: 220px;
    background-color: #ffffff;
    border-right: 1px solid #dcdcdc;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
    z-index: 999;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.menu-item>a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.menu-item>a:hover {
    background-color: #e6f0f8;
    color: #1a5a94;
}

.menu-item>a::before {
    content: "▶";
    margin-right: 10px;
    font-size: 12px;
    transition: transform 0.3s;
}

.menu-item.has-children.open>a::before {
    transform: rotate(90deg);
}

.menu-item.active>a {
    background-color: #1a5a94;
    color: white;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f8fbfd;
    display: none;
}

.submenu.open {
    display: block;
}

.submenu li a {
    display: block;
    padding: 12px 20px 12px 45px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
    font-size: 14px;
}

.submenu li a:hover {
    background-color: #e6f0f8;
    color: #1a5a94;
    padding-left: 50px;
}

.submenu li.active a {
    background-color: #e6f0f8;
    color: #1a5a94;
    border-left: 3px solid #1a5a94;
}

.submenu li:last-child a {
    border-bottom: none;
}

/* 内容区域样式 */
.content {
    flex: 1;
    margin-left: 220px;
    padding: 20px;
    overflow-x: auto;
}

.breadcrumb {
    background-color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #1a5a94;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.content-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.content-header h2 {
    color: #1a5a94;
    font-size: 20px;
    font-weight: 500;
}

.content-body {
    background-color: white;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

.content-body h3 {
    color: #1a5a94;
    margin-bottom: 20px;
    font-size: 18px;
}

.content-body p {
    line-height: 1.8;
    color: #555;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 180px;
    }

    .content {
        margin-left: 180px;
    }

    .logo {
        font-size: 18px;
    }
}

/* 纯CSS菜单控制 */
.menu-checkbox {
    display: none;
}

.menu-label {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    user-select: none;
}

.menu-label:hover {
    background-color: #e6f0f8;
    color: #1a5a94;
}

.menu-label::before {
    content: "▶";
    margin-right: 10px;
    font-size: 12px;
    transition: transform 0.3s;
}

.menu-checkbox:checked+.menu-label::before {
    transform: rotate(90deg);
}

.menu-checkbox:checked~.submenu {
    display: block;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    border-bottom: 2px solid #1a5a94;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 25px;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    font-weight: 500;
    color: #555;
    transition: all 0.3s;
}

.tab:hover {
    background-color: #e9f0f8;
    color: #1a5a94;
}

.tab.active {
    background-color: #1a5a94;
    color: white;
    border-color: #1a5a94;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: left;
}

.data-table th {
    background-color: #1a5a94;
    color: white;
    font-weight: bold;
    text-align: center;
}

.data-table thead th {
    text-align: center !important;
}

.data-table tr:nth-child(even) {
    background-color: #f8fbfd;
}

.data-table tr:hover {
    background-color: #e6f0f8;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #1a5a94;
    background-color: #ffffff;
    cursor: pointer;
    color: #1a5a94;
    transition: all 0.3s;
}

.pagination button:hover {
    background-color: #1a5a94;
    color: white;
}

.pagination button.active {
    background-color: #1a5a94;
    color: white;
}

.pagination button:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

/* 查询表单样式 */
.search-form {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #1a5a94;
}

.form-title {
    font-size: 16px;
    color: #1a5a94;
    font-weight: 500;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.form-group label {
    margin-right: 10px;
    font-weight: 500;
    white-space: nowrap;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 200px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1a5a94;
    outline: none;
    box-shadow: 0 0 5px rgba(26, 90, 148, 0.3);
}

.search-btn {
    background-color: #1a5a94;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #154a7a;
}

.reset-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: #5a6268;
}

.upload-all-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    float: right;
    margin-left: 10px;
}

.upload-all-btn:hover {
    background-color: #218838;
}

.upload-by-dept-btn {
    background-color: #1a5a94;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    float: right;
    margin-left: 10px;
}

.upload-by-dept-btn:hover {
    background-color: #154a7a;
}

/* 状态标签样式 */
.status-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

/* 状态标签样式 */
.status-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-unsync {
    background-color: #fff3cd;
    color: #856404;
}

.status-synced {
    background-color: #d4edda;
    color: #155724;
}

.status-nosync {
    background-color: #f8d7da;
    color: #721c24;
}

/* 页面标题装饰 */
.page-title-decor {
    position: relative;
    padding-left: 15px;
}

.page-title-decor::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 4px;
    height: 20px;
    background-color: #1a5a94;
}

/* 操作按钮样式 */
.action-link {
    color: #1a5a94;
    text-decoration: underline;
    cursor: pointer;
    margin: 0 5px;
}

.action-link:hover {
    color: #0f3c6e;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 500px;
    position: relative;
    border-radius: 5px;
}

.modal-header {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.modal-header h3 {
    color: #1a5a94;
    margin: 0;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-body input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}

.modal-footer {
    text-align: center;
}

.modal-btn {
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 3px;
    cursor: pointer;
}

.modal-confirm-btn {
    background-color: #1a5a94;
    color: white;
    border: none;
}

.modal-cancel-btn {
    background-color: #6c757d;
    color: white;
    border: none;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 0;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content .form-group {
    margin-bottom: 15px;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-content input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* 模态框按钮容器居中 */
.modal-content .form-group:last-child {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.modal-content button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-content button[type="submit"] {
    background-color: #1a5a94;
    color: white;
}

.modal-content button[type="button"] {
    background-color: #6c757d;
    color: white;
}

/* 为认领目录列表添加水平滚动容器 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    width: 100%;
}

/* 强制显示滚动条 */
.table-container::-webkit-scrollbar {
    -webkit-appearance: none;
    height: 20px;
}

.table-container::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background-color: rgba(0, 0, 0, .5);
    -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}

.table-container::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 6px;
}

/* Firefox浏览器的滚动条样式 */
.table-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, .5) rgba(0, 0, 0, .1);
}

/* 确保表格足够宽以触发滚动 */
.table-container .data-table {
    min-width: 100%;
    width: 100%;
    border-collapse: collapse;
}

.table-container .data-table th,
.table-container .data-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: left;
    white-space: nowrap;
}

/* 固定列样式 */
.sticky-column {
    position: sticky;
    right: 0;
    background-color: #1a5a94;
    z-index: 10;
}

.data-table td.sticky-column {
    background-color: #fff;
    border-left: 2px solid #ddd;
}

.data-table tr:nth-child(even) td.sticky-column {
    background-color: #f8fbfd;
}

.data-table tr:hover td.sticky-column {
    background-color: #e6f0f8;
}

/* 自定义通知样式 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    line-height: 1;
    color: inherit;
}

.notification-info {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1a5a94;
}

.notification-success {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.notification-error {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    color: #c8161d;
}

.notification-warning {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    color: #d48806;
}

/* 自定义模态对话框样式 */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.custom-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 350px;
    max-width: 500px;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.custom-modal.show .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-confirm-btn {
    background-color: #1a5a94;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.modal-confirm-btn:hover {
    background-color: #2a7bc4;
}

.modal-info .modal-header {
    border-bottom-color: #91d5ff;
    background-color: #e6f7ff;
}

.modal-success .modal-header {
    border-bottom-color: #b7eb8f;
    background-color: #f6ffed;
}

.modal-error .modal-header {
    border-bottom-color: #ffccc7;
    background-color: #fff2f0;
}

.modal-warning .modal-header {
    border-bottom-color: #ffe58f;
    background-color: #fffbe6;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-confirm-btn {
    background-color: #1a5a94;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.modal-confirm-btn:hover {
    background-color: #2a7bc4;
}

.modal-cancel-btn {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.modal-cancel-btn:hover {
    background-color: #e0e0e0;
}